package offer;

public class offer_0027 {
    public TreeNode mirrorTree(TreeNode root) {
        return  mirror(root);
    }
    public TreeNode mirror(TreeNode node){
        if(node==null) return null;
        TreeNode node1=node.left;
        node.left=node.right;
        node.right=node1;
        mirror(node.right);
        mirror(node.left);
        return node;
    }
}
